package com.sjm.dao;

import java.util.List;
import javax.faces.bean.ManagedBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;
import com.sjm.model.SubSystemStatus;
import com.sjm.service.SjmService;


@Transactional
@Repository
@ManagedBean(name = "sjmDao")
public class SjmDao {
	
	private List<SubSystemStatus> listSubSystemStatus;
	@Autowired
    private SjmService sjmService;
	public SjmDao() {
	}
	
	public SjmService getSjmService() {
		return sjmService;
	}

	public void setSjmService(SjmService sjmService) {
		this.sjmService = sjmService;
	}

	public List<SubSystemStatus> getListSubSystemStatus() {
		return listSubSystemStatus;
	}
	public void setListSubSystemStatus(List<SubSystemStatus> listSubSystemStatus) {
		this.listSubSystemStatus = listSubSystemStatus;
	}
	
	
	public void findByStatus(String status) {
		this.listSubSystemStatus = sjmService.findByStatus(status);
	}
}
